#include "widget.h"
#include "ui_widget.h"
#include <QDebug>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    //初始化下拉框
    ui->comboBox_1->addItem("香辣鸡腿堡");
    ui->comboBox_1->addItem("藤椒鸡腿堡");
    ui->comboBox_1->addItem("培根鸡腿堡");
    ui->comboBox_2->addItem("麦乐鸡块");
    ui->comboBox_2->addItem("薯条");
    ui->comboBox_3->addItem("可乐");
    ui->comboBox_3->addItem("雪碧");
    //初始化微调框
    ui->spinBox_1->setValue(1);
    ui->spinBox_1->setRange(1,5);
    ui->spinBox_2->setValue(1);
    ui->spinBox_2->setRange(1,5);
    ui->spinBox_3->setValue(1);
    ui->spinBox_3->setRange(1,5);

}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_clicked()
{
    qDebug()<<"当前下单的内容: "
            <<ui->comboBox_1->currentText()<<" "<<ui->spinBox_1->value()
            <<ui->comboBox_1->currentText()<<" "<<ui->spinBox_1->value()
            <<ui->comboBox_1->currentText()<<" "<<ui->spinBox_1->value();

}
